package com.web.account.mapper;


import com.web.account.entity.Account;
import com.web.common.BaseResult;
import com.web.customer.entity.Customer;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface AccountMapper {

    List<Account> getAccounts(@Param("accountNo") String accountNo, @Param("currency") String currency, @Param("customerNo") Integer customerNo);

    Integer addAccount(Account account);

    Integer amendAccount(Account account);

    Integer logicalDeleteAccount(@Param("accountNo") String accountNo);

    List<Account> checkDuplicateDate(Account account);

    List<Account> getAccountData(Account account);

    Integer bulkInsertAccount(List<Account> accounts);

    Integer physicsDeleteAccount(@Param("customerNo") Integer customerNo);

    Account getAccountByPendingNumber(@Param("pendingNumber") Integer pendingNumber);

    Integer physicsDeleteAccountByPendingNumber(@Param("pendingNumber") Integer pendingNumber);

    Integer updateApproved(@Param("pendingNumber") Integer pendingNumber);

    Integer updatePendingNumber(Account accountOld);

    Integer addTemporaryAccount(Account accountNew);

    Integer physicsDeleteAccountTmp(@Param("pendingNumber") Integer pendingNumber);

    Account getTemporaryAccount(@Param("pendingNumber")Integer pendingNumber);

    Integer updateSourceAccount(Account accountOld);

    Account getBuyAccountByCurrency(@Param("buyCurrency") String buyCurrency, @Param("customerNo") Integer customerNo);

    Account getSellAccountByCurrency(@Param("sellCurrency") String sellCurrency, @Param("customerNo") Integer customerNo);

    Integer updateAmount(Account buyAccount);
}
